#include <iostream>

#define P   ((1U << 31) - 1)


const unsigned int large_p = ((1U << 31) - 1);


unsigned long long mode (unsigned long long n){
	return n % large_p;

}



unsigned long long div (unsigned long long n){
	return n / P;

}


int main()
{

	unsigned long long num;
	std::cin >>num;

	unsigned long long ans = mode(num);
	std::cout <<ans<< std::endl;
}
